<#376#><FONT SIZE="+2"><B>Appendix A Estimating Pythagorean Square-root</B></FONT><#376#>
<P>
<P><BR>
For the line drawing commands described in the main sections of this
document, we need to estimate the Pythagorean square-root in order to
determine the length of the line (along its slope). More precisely, we need
to estimate the number of segments of a given length needed to draw a line.
T<SMALL>E</SMALL>X does not provide for floating point calculations, and thus there are no
direct means of calculating the above square-root. Most standard numerical
techniques are iterative and would be too slow when used with T<SMALL>E</SMALL>X for lack
of floating point calculations, and in particular, real division, since
calculation of such a square-root is needed very frequently.
<P>
A simple non-iterative formula for estimating the square-root is derived and
described below.
<P>
<P><P><BR>
<#377#><B>Problem: </B><#377#> Given <I>a</I> and <I>b</I>, to find <I>c</I> = <tex2html_verbatim_mark>#math95#<tex2html_image_mark>#tex2html_wrap_inline1741# using
only operations in {+ , - ,*,/}.
<P>
We can get very tight bounds on the square-root as follows.
Without loss of generality, let <I>a</I>≥<I>b</I>. We seek a simple <I>n</I>